home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Almathera Ten Pack 3: CDPD 3
/
Almathera Ten on Ten - Disc 3: CDPD3.iso
/
scope
/
101-125
/
scopedisk103
/
fishtank
/
docs
/
makefish.doc
< prev
next >
Wrap
Text File
|
1995-03-19
|
18KB
|
397 lines
How to make and add your own "fishTank" fish
* makeFish.doc *
--************--
The fishTank was designed to accept fish other than just
those that it came with. Once you have had experience using the
fishTank for a while you may want to add some of your own fish.
This file explains how to build a fish of your own description to
add to the fishTank.
First you will need to draw pictures of the fish's parts.
The parts need to be HAM-mode brush files. Most major HAM-mode
paint packages will work. I used Photon Paint to make most of the
brushes and DigiPaint3 and Deluxe Photo Lab for the rest.
I would generally recommend making rectangular brushes (that
way you know what size they are). One thing to make sure of is
that you use the same palette as the tank background pictures for
all the fish parts you draw. You can do this by loading a tank
background picture (a .pix file) and then clearing the screen to
color zero (black). Remember that since this is HAM-mode you can
get any color, regardless of whether it is in the palette. The
other thing to be sure of is that the 'background' or
'transparent color' of all your brushes is color zero.
As a starting point for most fish I would recommend drawing
two body brushes and three of each of the fins (or perhaps three
body brushes and two of each fin). It's a good idea to keep all
the brushes of one fish in a directory named for that fish, and
to name all your brushes with a ".br" extension to differentiate
them from other types of files that you will be using (such as
".pix" files for background pictures, and ".ascii" files for
fish-headers that will be described later).
Now that you've gone and drawn your brushes, and saved them
to a disk, you're ready to make a "fish-header file". In order to
do this you will need two things:
1. Some information about the fish - This information
is available in any number of reference books. I got most of my
information from Dr. Axelrod's Mini-Atlas of Freshwater Aquarium
Fishes, but if you don't have a copy of that handy, use whatever
reference books on fish you do have. Some books geared to
beginners may not have the information you need, if this is the
case you should try to find Dr. Axelrod's Atlas or Mini-Atlas at
your local public library.
Bare in mind that this fishTank is a freshwater tank
and will not be accurate in simulating the environment of
saltwater or brackish-water fishes.
2. A text editor - I've been using micro-Emacs, which
those of you who have Workbench1.3 will be able to find on your
"Extras" disk in the tools directory (it's called mEmacs). If you
don't have a version of emacs you can either get one off a
bulletin-board or use notepad or some other editor, but be sure
not to use any special fonts.
Page 1
How to make and add your own "fishTank" fish
Now you're ready to start. Edit a new file and call it by
the name of your fish with a ".ascii" extension (for example:
swordtail.ascii). The format of this file is quite fussy; there
must be no extra lines, and the lines I've set aside for
comments actually need to have comments on them. I would suggest
copying one of the ".ascii" files you already have (the ones I
wrote) and editing that. (For the examples I will use a swordtail
with two body brushes named "body-1.br" and "body-2.br", three
tail brushes named "tail-1.br" etc., and three dorsal fin brushes
named "dfin-1.br" and so on for a total of eight brushes. I will
also assume these brushes are in a directory called "swordtail"
on a disk called "fish:".)
When I look up swordtail (Xiphophorus helleri) in the
Mini-Atlas I see the following information:
pH 7.3
hardness 14 DH
temperature 25 degrees Celsius
lighting bright, no sunlight
aggressiveness not aggressive
tank conditions densely planted
swimming habits all over the tank
food flakes
Now all you need to do is put all that information and the
names and locations of the brushes in your ".ascii" file.
Building the fish-header (".ascii") File
-----------------------------------------------------------------
The first two lines should be comments. You will notice that
I use these lines for the fileName, but you can use them any way
you want to.
Line #3: The first three characters on this line should be a
number describing the starting horizontal position for your fish.
Since this is a low-res screen this number must be between zero
and 320, but remember that your fish takes up space too, so the
upper limit to this number will actually be 320-the length of
your fish. The fishTank only looks at the first three characters
on this line, so don't put any spaces or tabs before the number.
If this number is a one or two digit number you can put spaces
after it to get to three characters. You can, but do not need to,
put a comment on the remainder of this line, but make sure this
line is no more than 80 characters long (including spaces -
this shouldn't be a problem in most editors).
Line #4: This line should contain the vertical starting
position. Use the same three-character format as line #3. This
number needs to be between 12 (we leave a few pixels of space at
the top for the menu bar) and 200-the height of your fish. If
your fish's swimming habits are not all over the tank (like the
Page 2
How to make and add your own "fishTank" fish
swordtail in the example), this number should be between the
fish's upper swimming limit and its lower swimming limit minus
the height of the fish.
Line #5: The horizontal velocity of the fish. Make this
either 1 or -1 to start out with, depending on weather you want
your fish to start swimming from left to right(1) or right to
left(-1). Once you've seen your fish swimming in the tank you can
use these to adjust its speed. Larger values could be used here,
but keep them from being to large or small (try using values
between -4 and 4), or your fish will not swim fluidly. Once again
keep the same three-digit number format as line #3. That is the
format that all the lines that contain numbers must have.
Line #6: The vertical velocity of the fish. Use the same
guidelines as line #5, but here -1 will start your fish going up
and 1 will start it going down.
Line #7: Horizontal translation value. Make this number zero
for now. If you have set the velocities (lines 5 and 6) to
anything other than zero, the translations should remain zero.
Line #8: Vertical translation value. Use zero to start out
with. To control the motion of the fish you will either want to
set the velocities or the translations, but not both. With my
fish the velocities tend to yield a slightly smoother motion than
the translations, but fish could be drawn to work better with
either type of animation.
Line #9: Top of swimming area. This should be between 12
(for a fish that swims either all over the tank or near the top)
and around 170 (for a bottom swimmer, like a catfish).
Line #10: Bottom of swimming area. This should be bigger
than the number on line #9, and no larger than 200.
Line #11: Optimum temperature in degrees Celsius. For the
swordtail this should be 25. If you can only find the temperature
in Fahrenheit you will need to convert it with this formula:
Celsius = ( Fahrenheit - 32 ) * 5 / 9
Line #12: Optimum pH. This is the acidity of the water. You
need to have only one digit after the decimal point, any more
will mess things up. For the swordtail this number would be 7.3 .
Most fish will need the pH to be relatively close to 7.0, which
is neutral.
Line #13: Optimum hardness in DH. This number reflects the
amount of calcium in the water. Lower numbers mean there is less
calcium. If you can't find the correct hardness for your fish, it
is usually safe to assume it to be about 9 or 10. The swordtail
likes a hardness of 14 which is harder than most other fish. If
you can only find this value in "parts per million" (or p.p.m.)
use this formula:
DH = ppm / 18
Line #14: Length of your fish in pixels. Just how long is
your fish? This will depend on how long the brushes are. This
value need not be exact. If you think your fish is about a
quarter as wide as the whole screen that would make it (... lets
Page 3
How to make and add your own "fishTank" fish
see the screen is 320 wide and 320 divided by 4 is ...) 80 pixels
wide. By the way if you make your fish very big it will slow down
the whole fishTank, and if it is 300 pixels wide (or more) you
won't be able to put them in the tank at all ( You'll be told it
is too big).
Line #15: Height of your fish in pixels. This can also be
approximate. Since the screen is 200 pixels tall, if your fish is
about a quarter the height of the screen this number would be 50.
Line #16: Aggressiveness. If your fish is called a
"peaceful community fish" like the swordtail, this should be
zero. Actually almost any fish you would want to add would fit
this description. ( This feature has not yet been implemented -
so you can put anything here and not affect the fishTank. )
Line #17: Food type. What type of food best describes your
fish's regular diet. Enter the number that corresponds to your
choice:
0 flakes or other prepared foods
1 worms or other small, living creatures
2 live fish such as 'feeder' guppies
3 vegetables or other plant materials
4 goldfish flakes or other goldfish food
If you're not sure what the fish normally eats, and if it's a
fairly common aquarium fish, zero is probably is a pretty safe
guess. (Goldfish flakes is a different code than 'normal'
tropical fish flakes because goldfish preparations normally
contain a good deal more protein.)
Line #18: Type of lighting. Just about any fish you would
want to have in your fishTank will require the 'normal' type of
lighting, so make this "1" unless you find something quite
unusual about your fish's requirements. Codes are as follows:
0 very bright with some sunlight
1 'normal' - bright with no sunlight
2 as dark as possible
( This feature is not yet implemented. )
Line #19: Type of tank the fish prefers. These are the
codes:
0 densely planted
1 rocks, no plants
2 gravel only (no rocks or plants)
3 rocks, plants, and driftwood
( This feature has not yet been implemented. )
Line #20: This line is a comment. Put anything you want
here, just don't leave it out.
Line #21: The number of fish parts. In our swordtail example
this would be "3" since that fish has some body-brushes some
tail-brushes and some dorsal-fin-brushes. Don't confuse this with
the total number of brushes which would be "8" for the swordtail.
Line #22: Number of brushes in the first fish part. In the
case of the swordtail we might want this to be the number of
"body-brushes" (which is "2"). The order in which you specify the
Page 4
How to make and add your own "fishTank" fish
brushes in this list will be the order in which they are drawn,
so the brush that you want to be on top should be last in the
file.
Line #23: Name of the first brush. This line should contain
the name of the first brush of the first fish part. You should
include the path in this name, and the full path and name should
take up no more than 40 characters (try giving the directory or
the brushes shorter names if this is a problem). In the example
this line would be:
fish:swordtail/body-1.br
The name must start at the beginning of the line, and there must
not be any comments following it.
Line #24: The relative horizontal position of this brush.
This number describes where the upper lefthand corner of this
brush should be relative to the other brushes in the fish. It can
be fairly tricky to come up with these numbers, and will likely
need some fine-tuning. A good place to start may be to look at
what these values are in one of my ".ascii" files. Choose one of
a fish that faces the same direction and is about the same size,
and copy the values. You will then be able to make adjustments
once you've seen your fish in the fishTank.
Line #25: Relative vertical position. See line #24.
Line #26: Name of next brush in this fish part. In the
example this would be "fish:swordtail/body-2.br". Use the same
guidelines as line #23 for this and all the "brush name" lines.
Lines #27 and #28: Horizontal and vertical positions for the
brush named in the previous line. See line #24 for details.
If there were more than two brushes in the first part of your
fish you would just keep going with lines like 23 through 25 (or
26 through 28) until you had finished all the brushes if the
first fish part. When you had finished with them you would
continue with what I call line #29, but which may be in a
different place in your file.
Line #29: The number of brushes in the second fish part. In
the example this could be the number of "tail brushes" (which
would be "3"). (...and yes, if the brushes are not going to
overlap, it won't matter what order you have them in ...) See
line #22 for more details.
Lines #30, #31, and #32: Name and relative positions for the
first brush in the second part of the fish. The example lines
would be "fish:swordtail/tail-1.br", followed by two lines with
one number on each.
By now this pattern should be looking very systematic to you. You
keep entering three-line sequences of Name, xPosition and
yPosition until you run out of brushes in the fish part. Then you
use one line to contain the number of brushes in the next part,
and start the same three-line sequences again. Just keep doing
this until you've given names and positions for all the brushes
Page 5
How to make and add your own "fishTank" fish
you have in your fish. Your last line in this section will,
obviously, be the yPosition of the last brush of the last part of
your fish. (p.s.- There's nothing wrong with having a fish part
with only one brush in it. Look at "snail.ascii" for an example
of this - it has only one "shell" brush.)
Resume here once all your brush information has been put in your
file.
Last Line: This line will contain the name for this fish as
you would like to have it appear on the menu (sorry folks, no pun
was intended) . For the example "swordtail" would do quite well.
Try to keep this name short, or the menu will look sloppy. I use
common-names for the fish, and would suggest you do the same, as
latin names are frequently rather lengthy. As you may have
already figured out, you may not have a comment on this line, and
the name should start right at the beginning of the line.
"Last Line" was somewhat of a misnomer for the line that has the
menu-item name. It is actually the last line the program looks
at, but you can have as many lines of comments after this as you
want. The end of the file is perhaps the best place to put any
special notes you might have about this fish.
Page 6